<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="/static/bootstrap-3.3.7/css/bootstrap.css">
    <link rel="stylesheet" href="/static/font-awesome-4.7.0/css/font-awesome.css">
    <title>首页</title>
</head>
<body>
<div class="container">
    <h3 class="text-center">图书列表</h3>
    </p>
    <table class="table table-striped table-bordered table-hover">
        <thead>
        <tr>
            <td class="success">编号</td>
            <td class="info">书籍名称</td>
            <td class="success">作者</td>
            <td class="info">价格</td>
            <td class="success">操作</td>
        </tr>
        </thead>
        <tbody>
        {% for book in books %}
        <tr>
            <td>{{ loop.index }}</td>
            <td>{{ book.title }}</td>
            <td>
                {{book.author}}
            </td>
            <td>{{ book.price }}</td>
            <td>
                <a href="/edit?id={{ book.id }}" class="fa fa-edit">编辑</a>
                <a href="/delete?id={{ book.id }}" class="fa fa-remove">删除</a>
            </td>
        </tr>
        {% endfor %}

        </tbody>
    </table>
    <a href="/add"><input type="submit" class="btn btn-success" value="添加"/> </a>
    <a href="/upload"><input type="button" class="btn btn-success" value="上传"/> </a>
    <a href="/download"><input type="button" class="btn btn-success" value="导出"/> </a>
</div>
</body>
</html>